import { http } from '@/utils/http'

// 获得美食列表
export const getCuisinePage = (data, query) => {
  return http({
    url: `/app-api/countryside/visitor_center/getDelicacyPage`,
    method: 'POST',
    data,
    query,
  })
}

// 创建美食
export const cerateCuisine = (data) => {
  return http({
    url: `/admin-api/countryside/visitorCenter/createDelicacy`,
    method: 'POST',
    data,
  })
}
// 编辑美食
export const updateCuisine = (data) => {
  return http({
    url: `/admin-api/countryside/visitorCenter/updateDelicacy`,
    method: 'PUT',
    data,
  })
}
// 删除美食
export const deleteCuisine = (query) => {
  return http({
    url: '/admin-api/countryside/visitorCenter/delete',
    method: 'DELETE',
    query,
  })
}
// 获得美食详情
export const getCuisineDetails = (id) => {
  return http({
    url: '/app-api/countryside/visitor_center/getDelicacy?id=' + id,
    method: 'GET',
  })
}
